package web.ro.msg.gillardon.businesstripplanner;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import backend.ro.msg.gillardon.businesstripplanner.clujpopulation.parser.WikiClujParser;

public class ClujPopulationServlet extends HttpServlet {

  /**
   *
   */
  private static final long serialVersionUID = 1L;

  @Override
  protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException,
    IOException {

    PrintWriter printWriter = resp.getWriter();
    WikiClujParser clujParser = new WikiClujParser();

    getServletContext().log("RETURN : " + clujParser.getPopulationCluj());

    printWriter.write(clujParser.getPopulationCluj());

  }

  @Override
  protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException,
    IOException {
    // TODO Auto-generated method stub
    super.doPost(req, resp);
  }

}
